function RoundRect() {
	this.base = Component;
	this.base(document.createElement('v:roundrect'));
	this.setID('RoundRect' + G.canvas.getID());
	this.setPosition('absolute');
	this.setZIndex(G.canvas.getZIndex());
	this.getUI().id = this.id ? this.id : 'RoundRect' + G.canvas.getID();
	this.getUI().fillcolor = '#dfa067';
	this.getUI().filled = 't';
	this.getUI().arcsize = '9830f';
	this.getUI().stroked = 't';
	this.getUI().strokecolor = '#7c3e20';
	this.getUI().strokewidth = '1px';
	this.getUI().style.cursor = 'default';

	this.style = {
		'font-size': '20px',
		color: 'black',
		toString: function() {
			var s = '';
			for (var a in this) {
				s += a + ':' + this[a] + ';';
			}
			return s;
		}
	};
	
};
RoundRect.prototype = new Component();

RoundRect.prototype.render = function(canvas, left, top) {
	if (!canvas) canvas = document;
	this.setLeft(left);
	this.setTop(top);
	this.left = parseInt(left);
	this.top = parseInt(top);
	canvas.appendChild(this.getUI());
};
RoundRect.prototype._createUI = function() {
	this.getUI().innerHTML = '<v:shadow on="t" color="#907b4a" offset="3px,3px"/>' +
			'<v:stroke opacity=".5" startarrow="none" startarrowwidth="medium" startarrowlength="medium" endarrow="none"/>' +
			'<v:fill type="gradient" opacity=".5" color2="white" angle="0"/>' +
			'<table height="100%" width="100%"><tr><td class="canvas-ui-textbox" style="'+this.style+'">' + this.getText() + '</td></tr></table>';
};
RoundRect.prototype.toString = function() {
	return '[Compent RoundRect]';
};
RoundRect.prototype.getID = function() {
	if (!this.id)
		this.setID('RoundRect' + G.canvas.getID());
	return this.id;
};
RoundRect.prototype.getText = function() {
	if (!this.text)
		this.text = this.getID();
	return this.text;
};
RoundRect.prototype.setLeftTop = function (left, top) {
	this.setLeft(left);
	this.setTop(top);
	this.left = parseInt(left);
	this.top = parseInt(top);
};
RoundRect.prototype.setText = function(text) {
	this.text = text;
	if (this.getUI().childNodes)
		this.getUI().childNodes[3].childNodes[0].childNodes[0].childNodes[0].innerText = text;
};
RoundRect.prototype.getNorth = function() {
	var x = this.left + (this.width / 2);
	var y = this.top + G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getEast = function() {
	var x = this.left + this.width - G.canvas.config.step;
	var y = this.top + (this.height / 2);
	return new Point(x, y);
};
RoundRect.prototype.getSouth = function() {
	var x = this.left + (this.width / 2);
	var y = this.top + this.height - G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getWest = function() {
	var x = this.left + G.canvas.config.step;
	var y = this.top + (this.height / 2);
	return new Point(x, y);
};
RoundRect.prototype.getEastNorth = function() {
	var x = this.left + this.width - G.canvas.config.step;
	var y = this.top + G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getEastSouth = function() {
	var x = this.left + this.width - G.canvas.config.step;
	var y = this.top + this.height - G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getWestNorth = function() {
	var x = this.left + G.canvas.config.step;
	var y = this.top + G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getWestSouth = function() {
	var x = this.left + G.canvas.config.step;
	var y = this.top + this.height - G.canvas.config.step;
	return new Point(x, y);
};
RoundRect.prototype.getCenter = function() {
	var x = this.left + (this.width / 2);
	var y = this.top + (this.height / 2);
	return new Point(x, y);
};
